package com.aioz.security.controller;


import com.aioz.security.aop.annotation.LogInfoAnnotation;
import com.aioz.security.common.ResponseResult;
import com.aioz.security.entity.Education;
import com.aioz.security.service.impl.EducationServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Aioz
 * @since 2022-09-27
 */
@RestController
@RequestMapping("/education")
public class EducationController {

    @Autowired
    private EducationServiceImpl educationService;

    // 用户添加教育经历
    @PostMapping("/add")
    @LogInfoAnnotation
    public ResponseResult addEducation(@RequestBody Education education){
        return educationService.addEducation(education);
    }

    // 用户修改教育经历
    @PostMapping("/update")
    @LogInfoAnnotation
    public ResponseResult updateEducation(@RequestBody Education education){
        return educationService.updateEducation(education);
    }
}
